package com.chuhe.lottery.domain.enums;

/**
 * 奖池枚举类
 * @Author: 楚河
 * @Date: 2025-06-03 20:39
 */
public enum AwardsStatusEnum {

    FIRST_PRIZE(1, "一等奖"),
    SECOND_PRIZE(2, "二等奖"),
    THIRD_PRIZE(3, "三等奖"),
    ERROR_PRIZE(500, "错误奖项"),

    ;


    private Integer pid;
    private String desc;

    AwardsStatusEnum(Integer pid, String desc) {
        this.pid = pid;
        this.desc = desc;
    }

    public static AwardsStatusEnum getById(Integer pid) {
        for (AwardsStatusEnum item : AwardsStatusEnum.values()) {
            if (item.getPid().equals(pid)) {
                return item;
            }
        }
        return null;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
